#include<iostream>
#include <string>
using namespace std;
int max(int a, int b)
{
	return (a > b) ? a : b;
}
char Jchar1[300];
char Jchar2[300];
//char Jchar2[] = { '9','9','3','2','2','5','9','0','4','2' };
//                    2    3    6      0   8       3      0   4     7      0

int main()
{
	int a=0;
	char temp=' ';
	int k, l, intmax=0;
	
	for (k = 0;true; temp = getchar(), k++)
	{
		if (a == 1 && temp == '\n')
		{
			if (k > intmax)	intmax = k;
			break;
		}
		if (a == 0 && temp == '\n')
		{
			if (k > intmax)	intmax = k;
			l = k;
			a++; k = 0;
		}
		if (a == 0)
		{
			if (temp != '\n')
			Jchar1[k] = temp;
		}
		else
		{
			if (temp != '\n')
			Jchar2[k] = temp;
		}
	}
	swap(k, l);
	int* j1 = new int[intmax];
	int* j2 = new int[intmax];
	/*int j1[10];
	int j2[10];*/

	/*memset(j1, 0, intmax*4);
	memset(j2, 0, intmax * 4);*/
	for (int i = 0; i < intmax; i++)
	{
		j1[i] = 0;
	}
	for (int i = 0; i < intmax; i++)
	{
		j2[i] = 0;
	}
	int* JG = new int[intmax];
	for (int i = 0; i < intmax; i++)
	{
		JG[i] = 0;
	}




	for (int i = 1; i < k; i++)
	{
		j1[k - (i + 1)] = Jchar1[i] - '0';
	}
	//cout << j1[2];
	//int g = 6;
	for (int i = 1; i < l; i++)
	{
		j2[l - (i + 1)] = Jchar2[i] - '0';
	}
	//1234567
	//7890

	//cout << j1[9] << " " << j2[8];



	int TW = 0;
	int index = 0;
	while ((index < k) || (index < l))
	{
		if ((j1[index] - j2[index]- TW) < 0)
		{
			JG[index] = 10 + j1[index] - j2[index] - TW;
			TW = 1;
		}
		else
		{
			JG[index] = j1[index] - j2[index] - TW;
			TW = 0;
		}
		index++;
	}
	bool flag=false;
	//string tempstr = "";
	
	
	for (int z = intmax - 1; z >= 0; z--)
	{
		//tempstr += to_string(JG[z]);
		if (JG[z] != 0)
		{
			flag = true;
			
		}
		if (flag)
		{
			cout << JG[z];
		}

		
	}



	
	return 0;
}